package UI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * When you click on this MenuItem, it reads a file name from <code>fileNameTextField</code> and puts it to the repository.
 * @author Anna
 */
public class PutFileMenuItem extends SpecialMenuItem {
    public PutFileMenuItem(){
        super("Put file");
        addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                connect.putFile(fileNameTextField.getText(), textArea.getText());
            }
        });
    }
}
